package com.iraeta.service.basic.impl;

import com.iraeta.dao.main.RenyuanmappingDao;
import com.iraeta.entity.main.Renyuanmapping;
import com.iraeta.service.basic.RenYuanMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RenYuanMappingServiceImpl implements RenYuanMappingService {
    @Autowired
    RenyuanmappingDao renyuanmappingDao;

    @Override
    public int add(Renyuanmapping record) {
        return renyuanmappingDao.insert(record);
    }

    @Override
    public int update(Renyuanmapping record) {
        return renyuanmappingDao.updateByPrimaryKey(record);
    }

    @Override
    public int delete(Integer id) {
        return renyuanmappingDao.deleteByPrimaryKey(id);
    }

    @Override
    public Renyuanmapping get(Integer id) {
        return renyuanmappingDao.selectByPrimaryKey(id);
    }

    @Override
    public Renyuanmapping getByALiAccount(String aAccount) {
        return renyuanmappingDao.selectByAliAccount(aAccount);
    }

    @Override
    public List<Renyuanmapping> selectByName(String name) {
        return renyuanmappingDao.selectByName(name);
    }
}
